Log
The Log command displays a specified string between comment characters
(* and *) in the Script Editor's Event Log window. For more information about the Log Events window, see Start Log.Unlike most other scripting additions, the Log command is built into the AppleScript extension. It does not have a separate file in the Scripting Additions folder.
SYNTAX
log stringToLogPARAMETER
- stringToLog
- An expression that evaluates to a string or to a value that can be coerced to a string. The resulting string is displayed in the Event Log window.
Class: StringRESULT
NoneEXAMPLE
log "This string appears in the Log Events window"After running the preceding script, this text appears in the Log Events window:
(* This string appears in the Log Events window" *)NOTES
The Log command works even if logging has not been turned on with the Start Log command or has been turned off with the Stop Log command. If logging is turned off before the Log command is sent, it will still be turned off after the Log command is sent.ERROR
Error
numberError message -1700 Can't make some data into the expected type.